From 593dbc496f788190f2e9dad93f15e6fcededa9e8 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 25 Oct 2006 11:23:41 +0000 Subject: [PATCH] Make Linux usb_set_config error point to web doc. --- jeeps/gpslibusb.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/jeeps/gpslibusb.c b/jeeps/gpslibusb.c index 722635f21..225f35a47 100644 --- a/jeeps/gpslibusb.c +++ b/jeeps/gpslibusb.c @@ -209,7 +209,20 @@ garmin_usb_start(struct usb_device *dev) * Hrmph. No iManufacturer or iProduct headers.... */ if (usb_set_configuration(udev, 1) < 0) { +#if __linux__ + char drvnm[128]; + drvnm[0] = 0; + /* + * Most Linux distributions ship a slightly broken + * kernel driver that bonds with the hardware. + */ + usb_get_driver_np(udev, 0, drvnm, sizeof(drvnm)-1); + fatal("usb_set_configuration failed, probably because kernel driver '%s'\n is blocking our access to the USB device.\n" + "For more information see http://www.gpsbabel.org/os/Linux_Hotplug.html\n", drvnm); +#else + fatal("usb_set_configuration failed: %s\n", usb_strerror()); +#endif } if (usb_claim_interface(udev, 0) < 0) { -- 2.30.2